Micelio Detailed Documentation
Introduction
A brief overview of the "micelio" project:
Micelio is a Smart CDN Proxy that operates on Cloudflare's Workers platform, providing enhanced capabilities and efficiency for high-traffic endpoints used by storefronts powered by Farfalla. It significantly elevates scalability and reduces operational costs by adding a caching layer.
Micelio has integrated the functionality once exclusive to Felini, including the necessary handlers for specific endpoints and support for Felini's original domains.
The operational domains for Micelio are:
Production:
Staging:
Local development environments:
Micelio originated to optimize farfalla's "/latest-issue-cover-image" endpoint, which handles millions of requests per day. This endpoint redirects to the latest cover image of a tenant's issue and supports various filtering parameters.
The context for the launch can be found in this Slack thread: https://publicala.slack.com/archives/C1SCAFZPW/p1677866325462059
Micelio has also absorbed Felini's capabilities. Felini, which was created in February 2018 following the public beta release of Cloudflare Workers, offered rudimentary features that were periodically enhanced. However, due to a lack of maintenance and automated tests, Felini's development became challenging and fell out of sync with the rest of publica.la's environment.
In March 2023, we rebuilt our approach with Micelio, leveraging all the new tools provided by Cloudflare Workers. We established a cutting-edge development environment using Docker, initiated automated tests, and insured they ran in Continuous Integration (CI), blocking deployments if necessary. This was a golden chance to explore the improvements that Felini needed from a technical standpoint.
Micelio is envisioned to become a proxy layer for the entire platform, logically leading to the integration of Felini into Micelio, rather than updating Felini separately.
Project "micelio"
Overview
Micelio aims to serve as a foundational proxy layer, eventually replacing our HTTPS proxy fleet implemented with Caddy Server, and becoming the main entry point for our platform.
Features and Capabilities
- Proxies Farfalla's "/latest-issue-cover-image" endpoint to enhance scalability.
- Absorbed Felini's functionality, including support for EPUBs, PDFs, and Audiobooks, along with granular controls for content delivery.
Benefits to users include increased speed and reduced costs for running the endpoint, coupled with protection against traffic spikes. And from Felini's endpoints point of view, we get fine grained control over who, how, where and how gets access to content's files.
Getting Started
Micelio's development environment is integrated into zoo.
The associated domains are:
Integration of "felini"
Historical Context
Felini marked our initial venture into safeguarding client content from unauthorized downloading, supplementing our earlier methods, including file chunking primarily for UX enhancement.
The strategic choice to merge Felini into Micelio was due to Micelio's superior developer experience and its strategic position as a central entry point for the platform.
Transition Process
In November 2023, to satisfy content security audits from entities like PRH, we greatly improved Felini's capabilities. We took proactive measures to ensure swift and reliable output.
Modifications to incorporate Felini's functionalities were mostly about transferring code and making necessary updates, particularly noteworthy changes in endpoint routing and environment variable handling as per Cloudflare Worker's latest updates.
Existing Micelio users should perceive no differences after the integration. The most significant shift lies in the behind-the-scenes incorporation of Felini's codebase into Micelio, bringing along enhanced development experiences and consolidated operational environments.
Appendices
Additional resources regarding Micelio and related technologies:
- https://workers.cloudflare.com/
- https://blog.cloudflare.com/introducing-cloudflare-workers/
- https://developers.cloudflare.com/workers/
- https://gitlab.com/publicala/felini/
- https://gitlab.com/publicala/micelio
- https://hono.dev/
- https://caddyserver.com/
Glossary of relevant terms:
- CDN (Content Delivery Network): Distributes internet content delivery across a network of servers to improve speed and connectivity.
- Cloudflare Workers: Serverless compute service enabling app creation and augmentation with minimal infrastructure setup.
- Caddy Server: Open-source, enterprise-ready web server with automated HTTPS features.
- Endpoint: Network location accessed by an API to carry out specific functions.
- Hono: Framework for routing within Cloudflare Workers, designed for efficiency and ease of use.
- zoo: Localized development environment for setting up and testing Micelio.
- HTTPS proxy fleet: Collection of servers facilitating secure HTTPS communication.